enum {
WINDOW_ADDED,
WINDOW_REMOVED,
- QUIT,
LAST_SIGNAL
};
}
}
-static void
-gtk_application_quit (GtkApplication *app)
-{
- /* we are asked to quit, so don't linger */
- g_application_set_inactivity_timeout (G_APPLICATION (app), 0);
-}
-
static void
gtk_application_finalize (GObject *object)
{
class->window_added = gtk_application_window_added;
class->window_removed = gtk_application_window_removed;
- class->quit = gtk_application_quit;
g_type_class_add_private (class, sizeof (GtkApplicationPrivate));
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, GTK_TYPE_WINDOW);
- /**
- * GtkApplication::quit:
- * @application: the #GtkApplication
- *
- * Emitted when the session manager wants the application to quit
- * (generally because the user is logging out). The application
- * should exit as soon as possible after receiving this signal; if
- * it does not, the session manager may choose to forcibly kill it.
- *
- * Normally, an application would only be sent a ::quit if there
- * are no inhibitors (see gtk_application_inhibit()).
- * However, this is not guaranteed; in some situations the
- * session manager may decide to end the session without giving
- * applications a chance to object.
- *
- * To receive this signal, you need to set the
- * #GtkApplication:register-session property
- * when creating the application object.
- *
- * Since: 3.4
- */
- gtk_application_signals[QUIT] =
- g_signal_new ("quit", GTK_TYPE_APPLICATION, G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (GtkApplicationClass, quit),
- NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0);
-
/**
* GtkApplication:register-session:
*
g_debug ("Received EndSession");
gtk_application_quit_response (app, TRUE, NULL);
unregister_client (app);
- g_signal_emit (app, gtk_application_signals[QUIT], 0);
+ g_application_quit (G_APPLICATION (app));
}
else if (strcmp (signal_name, "Stop") == 0)
{
g_debug ("Received Stop");
unregister_client (app);
- g_signal_emit (app, gtk_application_signals[QUIT], 0);
+ g_application_quit (G_APPLICATION (app));
}
}
GtkApplication *app = data;
if (app->priv->quit_inhibit == 0)
- g_signal_emit (app, gtk_application_signals[QUIT], 0);
+ g_application_quit (G_APPLICATION (app));
else
{
GtkApplicationQuartzInhibitor *inhibitor;